const code = require("../models/code")

var express = require('express');
var router = express.Router();

// const formidable = require('formidable');

router.post('/', (req, res) => {
    code.find({}, (err, codeList) => {
        if(err) {
            console.log("11111");
            res.json({'state': false, 'msg': err})
        }else {
            res.json({
                'state': true,
                'codeList': codeList
            })
        }
    })
});

module.exports = router;